<%@page import="java.util.HashMap"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>MERCHANT CENTER</title>
		<%@ include file="/share/include.jsp" %>
		<!-- <script src="js/jquery.min.js"></script> -->
   		 <meta name="viewport" content="width=device-width, initial-scale=1">
		 <script type="application/x-javascript"> 
			addEventListener("load", function() { 
				setTimeout(hideURLbar, 0); 
			}, false); 
			function hideURLbar(){ 
				window.scrollTo(0,1); 
			} 
		</script>
	</head>
	<body>
		<!-- container -->
		<!-- header -->
		<div class="header">
			<%@ include file="/control/jsp/layout/header.jsp" %>
			<!-- /bottom-header -->
		</div>
		<!-- header -->
		<!--- top-nav -->
			<%@ include file="/control/jsp/layout/userMenu.jsp" %>
		<!--- top-nav -->
		<div class="details-page">
			<div class="content details-page">
				<div class="product-details">
					<div class="container">
						<div class="details-left" style="width: 100%;">
	<c:choose>
		<c:when test="${ack eq 'SUCCESS' or ack eq 'SUCCESSWITHWARNING' }">
			<h3 style="color: green">You have successfully paid!</h3>
		<%-- <span class="span4">
	  		</span>
	  		<span class="span5">
	  			<div class="hero-unit">
	  		<!-- Display the Transaction Details-->
	  			<h4> ${result.FIRSTNAME }
	  				${result.LASTNAME } , Thank you for your Order </h4>
	  			
	  			<h4> Shipping Details: </h4>
	  			${result.PAYMENTREQUEST_0_SHIPTONAME }<br>
			${result.PAYMENTREQUEST_0_SHIPTOSTREET }<br>
			${result.PAYMENTREQUEST_0_SHIPTOCITY }<br>
			
			<p>${result.PAYMENTREQUEST_0_SHIPTOSTATE }- ${result.PAYMENTREQUEST_0_SHIPTOZIP }</p>
	  			<p>Transaction ID: ${result.PAYMENTINFO_0_TRANSACTIONID } </p>
	  			<p>Transaction Type: ${result.PAYMENTINFO_0_TRANSACTIONTYPE } </p>
	  			<p>Payment Total Amount: ${result.PAYMENTINFO_0_AMT } </p>
	  			<p>Currency Code: ${result.PAYMENTINFO_0_CURRENCYCODE } </p>
	  			<p>Payment Status: ${result.PAYMENTINFO_0_PAYMENTSTATUS } </p>
	  			<p>Payment Type: ${result.PAYMENTINFO_0_PAYMENTTYPE } </p>
	  			<h3> Click <a href='index.jsp'>here </a> to return to Home Page</h3>
	  		
	  			</div>
	  		</span>
	  		<span class="span3">
	  		</span> --%>
		</c:when>
		<c:otherwise>
			<div class="hero-unit">
				<!-- Display the Transaction Details-->
				<h4> There is a Funding Failure in your account. You can modify your funding sources to fix it and make purchase later. </h4>
				Payment Status:
				PAYMENTINFO_0_PAYMENTSTATUS
				
				<h3> Click <a href='https://www.sandbox.paypal.com/'>here </a> to go to PayPal site.</h3> <!--Change to live PayPal site for production-->
				</div>
		</c:otherwise>
	</c:choose>
	</div>
	</div>
	</div>
	</div>
	</div>
<!-- footer -->
		<%@ include file="/control/jsp/layout/footer.jsp" %>
</body>
</html>